this.main = function() {
	var eidtform=null;
	var eidtwindow=null;
	var destroyObjs=[];
	var sm = new Ext.grid.CheckboxSelectionModel({
				singleSelect : false
			});
			
			var dataRecord = Ext.data.Record.create([
			{name : 'code',	type : 'string'},
			{name : 'title',	type : 'string'},
			{name : 'type',	type : 'string'},
			{name : 'description',	type : 'string'}
			]);
	var cm = new Ext.grid.ColumnModel([sm, {
				id : 'code',
				header : '代码',
				dataIndex : 'code',
				width : 120,
				sortable : true
			}, {
				id : 'title',
				header : '标题',
				dataIndex : 'title',
				width : 150,
				sortable : true

			}, {
				id : 'type',
				header : '类型',
				dataIndex : 'type',
				width : 150,
				sortable : true

			}, {
				id : 'description',
				header : '描述',
				dataIndex : 'description',
				width : 260,
				sortable : true

			}]);
	var store = new Ext.data.Store({
		autoLoad:true,
		proxy : new Ext.data.HttpProxy({
					url : basepath
							+ '../sysControl/report/DefineController/getReportInfoList.do'
				}),
		reader : new Ext.data.JsonReader({
					totalProperty : 'results',
					id : 'code'
				}, dataRecord)
	});
	function openwindow(title,url,isUpdate){
		if(isUpdate){
		 		var record = grid.getSelectionModel().getSelections();
					if (record.length <= 0) {
							Ext.MessageBox.alert('提示', '需要修改的记录');
							return;
						} else if (record.length > 1) {
							Ext.MessageBox.alert('提示', '最多只能选择一行');
							return;				
						}
		 	}
		 if(eidtwindow!=null){
		 	eidtwindow.setTitle(title);
		 	eidtwindow.actionUrl=url;
			eidtwindow.show();
			if(isUpdate)
				eidtform.getForm().setValues(record[0].data);
			else
				eidtform.getForm().reset();
			return;
			}
				  loadForm( basepath+"report/js/reportform.js",function(form){
				  		eidtform=form;
				  		destroyObjs[0]=form;
				  		eidtwindow = new Ext.Window({
								title : title,
								width : 382,
								closeAction : 'hide',
								plain : true,
								actionUrl:url,
								labelAlign : "right",
								buttonAlign : "center",
								resizable:false,
								modal:true,
								padding:"2px 2px",
								items : [eidtform],
								buttons : [ {text:"保存",
											   handler : function(){
											   		submitFormPanel(eidtform, eidtwindow.actionUrl, function(form,action){
											   			Ext.Msg.alert("提示",action.result.info);
											   				store.reload();
											   		})
											   
											   }
											},
											{text:"关闭",
											   handler : function() {
													eidtwindow.hide();	
											 	}
											}
										  ]
					
						});
				  		destroyObjs[1]=eidtwindow;
					if(isUpdate)
						eidtform.getForm().setValues(record[0].data);
					else
						eidtform.getForm().reset();
					eidtwindow.show();	  	 
				  	
				  },this);
		
		}
	var grid = new Ext.ux.grid.LockingGridPanel({
				cm : cm,
				sm : sm,
				width : frame_center.getInnerWidth() - 4,
				height : frame_center.getInnerHeight(),
				renderTo : 'divLlist' + this.menuid,
				store : store,
				tbar:[
				      {text : '新增',
							iconCls : 'table_add',
							handler : function() {
								openwindow('新增',basepath+'../sysControl/report/DefineController/DefineReportXML.do',false);
							}
				      }
				      ]
			});

	destroyResize(grid);
}
